Skip to content

[codex] Fix internal LongBridge precheck invoke#171

Merged
Pigbibi merged 1 commit into
mainfrom
codex/fix-longbridge-internal-precheck-invoke
Jun 18, 2026
Merged

[codex] Fix internal LongBridge precheck invoke#171
Pigbibi merged 1 commit into
mainfrom
codex/fix-longbridge-internal-precheck-invoke

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • route manual invokes for internal-ingress LongBridge Cloud Run services through the existing Cloud Scheduler jobs
  • print service/revision/commit diagnostics in the invoke workflow
  • label /precheck validation notifications as strategy prechecks instead of heartbeat messages

Fixes #168.

Validation

  • bash tests/test_invoke_cloud_run_workflow.sh
  • PYTHONPATH=/home/ubuntu/Projects/QuantPlatformKit/src:. python3 -m unittest tests.test_request_handling
  • PYTHONPATH=/home/ubuntu/Projects/QuantPlatformKit/src:. python3 -m py_compile main.py application/rebalance_service.py application/runtime_composer.py application/runtime_dependencies.py notifications/renderers.py notifications/telegram.py
  • lightweight render check for zh/en precheck titles

Note: full tests.test_notifications was not run locally because this VPS does not have pandas installed; CI installs the repo dependencies.

@Pigbibi Pigbibi marked this pull request as ready for review June 18, 2026 10:10
@Pigbibi Pigbibi merged commit e62a879 into main Jun 18, 2026
1 check passed
@Pigbibi Pigbibi deleted the codex/fix-longbridge-internal-precheck-invoke branch June 18, 2026 10:10

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4dd4aa6b7b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +288 to +292
if [ "${attempt_seen}" = "true" ]; then
if [ -n "${status_code}" ] && [ "${status_code}" != "0" ]; then
echo "Cloud Scheduler job ${scheduler_job} failed with status ${status_code}: ${status_message}" >&2
exit 1
fi

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Wait for the scheduler attempt to finish

Cloud Scheduler documents lastAttemptTime as the time an attempt started and status as the target response for the last attempted execution, so for /precheck runs that take more than a moment this branch can fire before the Cloud Run request has completed (or while status is still empty/stale from a previous run). Because an empty status is treated as success and the loop exits, the workflow can pass even if the forced scheduler invocation later returns 500; keep polling until the new attempt has a populated terminal status.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Manual Cloud Run invoke returns 404 for /precheck and /probe

1 participant